From 1f1b0c92edbb6f00508a98960e8ad8f5d45a3daa Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 1 Jul 2005 14:30:46 +0000 Subject: [PATCH] Fix Xen 'make install' not to rebuild console.o if called from sudo environemnt, for example. --- xen/Makefile | 7 +++++-- xen/drivers/char/Makefile | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index a97db44217..f45d3df74b 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -67,9 +67,12 @@ endif $(MAKE) -C arch/$(TARGET_ARCH) # drivers/char/console.o contains static banner/compile info. Blow it away. +# Don't refresh these files during e.g., 'sudo make install' delete-unfresh-files: - rm -f include/xen/banner.h include/xen/compile.h drivers/char/console.o - $(MAKE) -C arch/$(TARGET_ARCH) delete-unfresh-files + @if [ ! -r include/xen/compile.h -o -O include/xen/compile.h ]; then \ + rm -f include/xen/{banner,compile}.h; \ + $(MAKE) -C arch/$(TARGET_ARCH) delete-unfresh-files; \ + fi # acm_policy.h contains security policy for Xen include/xen/acm_policy.h: diff --git a/xen/drivers/char/Makefile b/xen/drivers/char/Makefile index 957a4bc5a2..10f907a477 100644 --- a/xen/drivers/char/Makefile +++ b/xen/drivers/char/Makefile @@ -7,3 +7,5 @@ driver.o: $(OBJS) clean: rm -f *.o *~ core + +console.o: $(BASEDIR)/include/xen/compile.h -- 2.30.2